package czk.concrent.enjoyModelWithNotLock.unsafe;

import java.lang.reflect.Field;

/**
 * @Author:ChenZhangKun
 * @Date: 2020/7/15 23:54
 */
public final class FiledDemo {
    private  static final FiledDemo filedDemo=null;

    private FiledDemo() {
    }

    public void get() {
        System.out.println("get");
    }
}

class Test {
    public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException {
        Field filedDemo = FiledDemo.class.getDeclaredField("filedDemo");
        filedDemo.setAccessible(true);
        FiledDemo filedDemo1 = (FiledDemo) filedDemo.get(filedDemo);
        filedDemo1.get();
    }
}

